home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / CUCD / Graphics / Ghostscript / doc / use.txt < prev    next >
Text File  |  1997-04-12  |  48KB  |  1,193 lines

  1.    Copyright (C) 1989, 1995, 1996 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17.  
  18. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  19.  
  20. This file, use.txt, describes how to use the Ghostscript language
  21. interpreter.
  22.  
  23. For an overview of Ghostscript and a list of the documentation files, see
  24. README.  
  25.  
  26. ********
  27. ******** Installing Ghostscript
  28. ********
  29.  
  30. Please read the documentation file install.txt for information on installing
  31. Ghostscript.
  32.  
  33. ********
  34. ******** Shell scripts for Ghostscript
  35. ********
  36.  
  37. The Ghostscript distribution includes several Unix shell scripts for
  38. driving Ghostscript in different environments.  These are all
  39. user-contributed code: please contact the user identified in the file, not
  40. Aladdin Enterprises, if you have questions.
  41.  
  42. > pv.sh - preview a specified page of a dvi file in an X window.
  43.  
  44. > sysvlp.sh - System V 3.2 lp interface for parallel printer.
  45.  
  46. > pj-gs.sh - printing on an H-P PaintJet under HP-UX.
  47.  
  48. > unix-lpr.sh - queue filter for lpr under Unix.
  49. > lprsetup.sh - setup for unix-lpr.sh.
  50.  
  51. If one of these serves your needs, you may be able to skip most of
  52. the rest of this document.
  53.  
  54. ********
  55. ******** How to use Ghostscript ********
  56. ********
  57.  
  58. To invoke the interpreter, give the command
  59.     gs <filename1> ... <filenameN>
  60. The interpreter will read in the files in sequence (using the method
  61. described under "File searching" below to find the files) and execute them.
  62. After doing this, it reads further input from the primary input stream
  63. (normally the keyboard).  Each line (i.e. characters up to a <return>) is
  64. interpreted separately.  To exit from the interpreter, type quit<return>.
  65. The interpreter also exits gracefully if it encounters end-of-file.  Typing
  66. the interrupt character, e.g., control-C, is also safe.
  67.  
  68. The interpreter recognizes several switches described below, which may appear
  69. anywhere in the command line and apply to all files thereafter.
  70.  
  71. You can get a brief help message by invoking Ghostscript with
  72.     gs -h
  73. or
  74.     gs -?
  75. This message also lists the available devices.  For a little more
  76. information about available devices, a one-line description of each device
  77. appears near the beginning of the file devs.mak.
  78.  
  79. Choosing the output device
  80. --------------------------
  81.  
  82. Ghostscript may be built with multiple output devices.  Ghostscript
  83. normally opens the first one and directs output to it.  To use device xyz
  84. as the initial output device, include the switch
  85.     -sDEVICE=xyz
  86. in the command line.  Note that this switch must precede the first .ps
  87. file, and only its first invocation has any effect.  For example, for
  88. printer output in a normal configuration that includes an Epson printer
  89. driver, you might use the shell command
  90.     gs -sDEVICE=epson myfile.ps
  91. instead of just
  92.     gs myfile.ps
  93. Alternatively, once you are inside Ghostscript, you can type
  94.     (epson) selectdevice
  95.     (myfile.ps) run
  96. All output then goes to the printer instead of the display until further
  97. notice.  You can switch devices at any time by using the selectdevice
  98. procedure, e.g.,
  99.     (vga) selectdevice
  100. or
  101.     (epson) selectdevice
  102. As yet a third alternative, you can define an environment variable
  103. GS_DEVICE as the desired default device name.  The order of precedence for
  104. these alternatives, highest to lowest, is:
  105.     selectdevice
  106.     (command line)
  107.     GS_DEVICE
  108.     (first device in build list)
  109.  
  110. To select the resolution on a printer, use the shell command
  111.     gs -sDEVICE=<device> -r<xres>x<yres>
  112. For example, on a 9-pin Epson-compatible printer, you can get the
  113. lowest-resolution (fastest) mode with
  114.     gs -sDEVICE=epson -r60x72
  115. and the highest-resolution mode with
  116.     gs -sDEVICE=epson -r240x72.
  117. On a 24-pin printer, the lowest resolution is
  118.     gs -sDEVICE=epson -r60x60
  119. and the highest-resolution 24-pin mode is
  120.     gs -sDEVICE=epson -r360x180
  121.  
  122. If you select a printer as the output device, Ghostscript also allows you
  123. to control where the device sends its output.  Normally, output goes
  124. directly to the printer (PRN) on MS-DOS systems, and to a scratch file on
  125. Unix or VMS systems.  To send the output to a series of files foo1.xyz,
  126. foo2.xyz, ..., use the switch
  127.     -sOutputFile=foo%d.xyz
  128. (For compatibility with older versions of Ghostscript, -sOUTPUTFILE=
  129. also works.)  The %d is a printf format specification; you can use
  130. other formats like %02d.  Each file will receive one page of output.
  131. Alternatively, to send the output to a single file foo.xyz, with all
  132. the pages concatenated, use the switch
  133.     -sOutputFile=foo.xyz
  134.  
  135. On Unix systems, you can send the output directly to a pipe.  For
  136. example, to pipe the output to the command `lpr' (which, on many Unix
  137. systems, is the command that spools output for a printer), use the
  138. switch
  139.     -sOutputFile=\|lpr
  140. You can also send output to stdout for piping with the switch
  141.     -sOutputFile=-
  142. In this case you must also use the -q switch, to prevent Ghostscript from
  143. writing messages to stdout.
  144.  
  145. File formats like PCX and PBM are also 'devices'.  When you select a file
  146. format as the 'device', you must also specify an output file, e.g.,
  147.     gs -sDEVICE=pcxmono -sOutputFile=xyz.pcx
  148.  
  149. To find out what devices are available, type
  150.     devicenames ==
  151. after starting up Ghostscript.  Alternatively you can use the -h or
  152. -? switch in the command line, as described above.
  153.  
  154. Choosing paper size
  155. -------------------
  156.  
  157. Ghostscript is normally configured to expect U.S. letter paper.  To select
  158. a different paper size as the default, find the line in gs_init.ps that
  159. says
  160.  
  161.     % Optionally choose a default paper size other than U.S. letter.
  162.  
  163. The next line begins
  164.  
  165.     % (a4)
  166.  
  167. To select A4 as the default paper size, remove the % but do not change
  168. anything else.  To select a different default paper size, remove the % and
  169. replace the word a4 with the name of the desired paper size.  You can use
  170. any paper size listed in the table at the beginning of gs_statd.ps.
  171. (Individual documents can also specify a paper size, which will take
  172. precedence over the one specified on the command line.)
  173.  
  174. Alternatively, to select a different paper size for a single invocation of
  175. Ghostscript, you can use the command line switch
  176.     -sPAPERSIZE=a_known_paper_size
  177. e.g.,
  178.     -sPAPERSIZE=a4
  179. or
  180.     -sPAPERSIZE=legal
  181.  
  182. Finally, most (but not all) of Ghostscript's printer drivers can be
  183. configured at compile time to use A4 paper as the default by including
  184. -DA4 in the CFLAGS switches in the makefile.  See make.txt for more
  185. details.
  186.  
  187. File searching
  188. --------------
  189.  
  190. When looking for initialization files (gs_*.ps, pdf_*.ps), font files, the
  191. Fontmap file, and files named on the command line, Ghostscript first checks
  192. whether the file name specifies an explicit directory or drive (i.e.,
  193. doesn't begin with '/' on Unix systems; doesn't begin with a '/' or '\' or
  194. contain ':' as the second character on MS-DOS systems; doesn't contain a ':'
  195. or a square bracket on VMS systems).  If it does, Ghostscript simply tries
  196. to open the file using the given name.  Otherwise, Ghostscript will try
  197. directories in the following order:
  198.  
  199.     - The current directory (unless disabled by the -P- switch);
  200.  
  201.     - The directory/ies specified by the -I switch(es) in the command
  202.       line (see below), if any;
  203.  
  204.     - The directory/ies specified by the GS_LIB environment variable,
  205.       if any;
  206.  
  207.     - The directory/ies specified by the GS_LIB_DEFAULT macro in the
  208.       Ghostscript makefile, if any.
  209.  
  210. Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either a
  211. single directory, or a list of directories separated by a character
  212. appropriate for the operating system (':' on Unix systems, ';' on VMS
  213. systems, ';' on MS-DOS systems).  We think that trying the current directory
  214. first is a very bad idea -- it opens serious security loopholes and can lead
  215. to very confusing errors if one has more than one version of Ghostscript in
  216. one's environment -- but when we attempted to change it, users insisted that
  217. we change it back.  You can disable looking in the current directory first
  218. using the -P- switch described below.
  219.  
  220. Note that Ghostscript does not use this file searching algorithm for the
  221. 'run' or 'file' operators: for these operators, it simply opens the file
  222. with the given name.  To run a file using the searching algorithm, use
  223. 'runlibfile' instead of 'run'.
  224.  
  225. When Ghostscript can't find a font in any Fontmap file in the search path,
  226. it looks at the GS_FONTPATH environment variable (or the value provided with
  227. the -sFONTPATH= switch, if present), which is also a list of directories.
  228. It goes to those directories, one by one, and looks for all files that
  229. appear to contain PostScript fonts; it then effectively adds all those files
  230. and fonts to its internal copy of the Fontmap (the catalog of fonts and the
  231. files that contain them).  If you are using one of the following types of
  232. computer, you may wish to set GS_FONTPATH to the indicated value so that
  233. Ghostscript will automatically acquire all the installed Type 1 fonts:
  234.  
  235.     System type        GS_FONTPATH
  236.     -----------        -----------
  237.     DEC OSF/1        /usr/lib/X11/fonts/Type1Adobe
  238.     DEC Ultrix        /usr/lib/DPS/outline/decwin
  239.     HP-UX 9            /usr/lib/X11/fonts/type1.st/typefaces
  240.     IBM AIX            /usr/lpp/DPS/fonts/outlines
  241.       "            /usr/lpp/X11/lib/X11/fonts/Type1
  242.       "            /usr/lpp/X11/lib/X11/fonts/Type1/DPS
  243.     NeXT            /NextLibrary/Fonts/outline
  244.     SGI IRIX        /usr/lib/DPS/outline/base
  245.       "            /usr/lib/X11/fonts/Type1
  246.     Sun SunOS 4.x        /usr/openwin/lib/X11/fonts/Type1/outline
  247.       " (NeWSprint only)
  248.    newsprint_2.5/SUNWsteNP/reloc/$BASEDIR/NeWSprint/small_openwin/lib/fonts
  249.     Sun Solaris 2        /usr/openwin/lib/X11/fonts/Type1/outline
  250.     VMS            SYS$COMMON:[SYSFONT.XDPS.OUTLINE]
  251.  
  252. These paths may not be exactly right for your installation; if the
  253. indicated directory doesn't contain files whose names are familiar font
  254. names like Courier and Helvetica, you may wish to ask your system
  255. administrator where to find these fonts.
  256.  
  257. NOTE: On Solaris systems simply setting GS_FONTPATH may not work, because
  258. for some reason some versions of Ghostscript can't seem to find any of the
  259. Type1 fonts in /usr/openwin/lib/X11/fonts/Type1/outline. It says: "15 files,
  260. 15 scanned, 0 new fonts". See Fontmap.Solaris instead.
  261.  
  262. Temporary files
  263. ---------------
  264.  
  265. By default, Ghostscript creates temporary files named _temp_XX.XXX in the
  266. current directory on MS-DOS and VMS systems, gsXXXXXX in the current
  267. directory on OS/2 systems, and gs_XXXXX in the /tmp directory on Unix
  268. systems.  You can change the directory in which Ghostscript will create
  269. these files by setting the TEMP environment variable to the name of the
  270. directory.
  271.  
  272. Ghostscript currently doesn't do a very good job of deleting temporary
  273. files when it exits; you may have to delete them manually from time to
  274. time.
  275.  
  276. Environment variable summary
  277. ----------------------------
  278.  
  279. GS_DEVICE
  280.     Defines the default output device.  Described above.
  281.  
  282. GS_FONTPATH
  283.     Specifies a list of directories that should be scanned for fonts
  284. at startup.  Described above.
  285.  
  286. GS_LIB
  287.     Provides a search path for initialization files and fonts.
  288. Described above.
  289.  
  290. GS_OPTIONS
  291.     Defines a list of command line arguments to be processed before
  292. the ones actually specified on the command line.  For example, setting
  293. GS_DEVICE to xxx is equivalent to setting GS_OPTIONS to -sDEVICE=xxx.  The
  294. contents of GS_OPTIONS are not limited to switches; they may include
  295. actual file names or even @file arguments.
  296.  
  297. TEMP
  298.     Defines a directory name for temporary files.  Described above.
  299.  
  300. ********
  301. ******** Using Ghostscript and Ghostview with PDF files
  302. ********
  303.  
  304. Ghostscript is normally configured (except on 16-bit MS-DOS platforms) so
  305. that it can interpret both PostScript and PDF files (the latter are
  306. sometimes incorrectly called "Acrobat files").  It examines each file to
  307. determine automatically whether it is a PDF file or a PostScript file.  All
  308. the normal switches and procedures for interpreting PostScript files also
  309. apply to PDF files, with a few exceptions noted below.  In addition, there
  310. is a shell script
  311.  
  312.         pdf2ps input.pdf output.ps
  313.  
  314. that converts PDF to (Level 2) PostScript.
  315.  
  316. Switches not applicable to PDF files
  317. ------------------------------------
  318.  
  319. You cannot use the `-' switch to provide PDF input from stdin or a pipe.
  320. The PDF language, unlike the PostScript language, inherently requires random
  321. access to the file.
  322.  
  323. Added switches for PDF files
  324. ----------------------------
  325.  
  326.     -dFirstPage=pagenumber
  327.         Starts interpreting on the given page of the document.
  328.  
  329.     -dLastPage=pagenumber
  330.         Stops interpreting after the given page of the document.
  331.  
  332.     -sPSfile=filename
  333.         Writes the PostScript equivalent of the PDF input on the
  334.         given file.
  335.  
  336. Ghostview and PDF files
  337. -----------------------
  338.  
  339. Since Ghostview pipes PostScript files to Ghostscript, you cannot view PDF
  340. files with Ghostview just by saying
  341.         ghostview file.pdf
  342. Instead there are two options:
  343.  
  344.    1. Tanmoy Bhattacharya has written some patches for Ghostview 1.5
  345.    that allow it to read and display PDF files.  These are available
  346.    from:
  347.        ftp://gita.lanl.gov/people/tanmoy/hypertex/gv1.5gs3.33hack.tar.gz
  348.  
  349.    2. Start Ghostview as follows:
  350.           ghostview -arguments file.pdf quit.ps
  351.    This will allow you to display a PDF file, but you won't be able
  352.    to jump to particular pages.  Use Tanmoy's code if you want that
  353.    facility.
  354.  
  355. ********
  356. ******** Notes on specific platforms ********
  357. ********
  358.  
  359. VMS
  360. ---
  361.  
  362. On VMS systems, the last character of each "directory" name indicates what
  363. sort of entity the "directory" references.  If the "directory" name ends
  364. with a colon, it is taken as referring to a logical device, e.g.:
  365.     $ DEFINE GHOSTSCRIPT_DEVICE DUA1:[GHOSTSCRIPT_14]
  366.     $ DEFINE GS_LIB GHOSTSCRIPT_DEVICE:
  367. If the "directory" name ends with a closing square bracket, it is taken as
  368. referring to a real directory, e.g.:
  369.     $ DEFINE GS_LIB DUA1:[GHOSTSCRIPT]
  370.  
  371. To run Ghostscript with switches, you must type a command like
  372.  
  373.     $ gs "-dNODISPLAY"
  374.  
  375. because the C run time library will convert the command
  376. parameters/arguments to lowercase unless you enclose them in double quotes
  377. which preserves the case.
  378.  
  379. If you are on an X Windows display (for which gs is built), you can do
  380.  
  381.     $ set display/create/node="domain-name"/transport=tcpip
  382.  
  383. For example,
  384.  
  385.     $ set display/create/node="doof.city.com"/transport=tcpip
  386.  
  387. and then run Ghostscript
  388.  
  389.     $ gs
  390.  
  391. If you write printer output to a file and then want to print the file
  392. later, use the "/PASSALL" qualifier to the PRINT command.
  393.  
  394. In order to get PDF files (or PostScript files that use the setfileposition
  395. operator) to work properly on VMS systems, you must ensure that they are
  396. "stream LF" type files.  (**NOTE**: This only applies if you are using DEC C
  397. to compile Ghostscript; there is no known way to get these files to work
  398. properly with the old VAX C compiler.)  If you transfer files by FTP, you
  399. probably need to do one of the following two things after the transfer:
  400.  
  401. 1. If FTP'd in text/ASCII mode then do:
  402.  
  403.      $ CONVERT/FDL=STREAMLF.FDL input-file output-file
  404.  
  405.    where the contents of the file STREAMLF.FDL are given below.
  406.  
  407. 2. Otherwise, if FTP'd in binary mode do
  408.  
  409.      $ SET FILE/ATTRIBUTE=(RFM:STMLF)
  410.  
  411. The contents of the STREAMLF.FDL file are shown between, and exclusive of, the
  412. dashed lines:
  413.  
  414. -------------------------------------------------
  415. FILE
  416.         ORGANIZATION            sequential
  417.  
  418. RECORD
  419.         BLOCK_SPAN              yes
  420.         CARRIAGE_CONTROL        carriage_return
  421.         FORMAT                  stream_lf
  422. -------------------------------------------------
  423.  
  424. MS-DOS
  425. ------
  426.  
  427. Ghostscript supports many SuperVGA displays directly, most of them with
  428. more than 16 colors.  The complete list is in the file devs.mak, which is
  429. part of the Ghostscript source code.  (If you got Ghostscript under the
  430. Aladdin Ghostscript Free Public License, the person or place from which you
  431. got it is also required to make the source code available to you; if you
  432. got it under the GNU License, see the GNU License for more information.)
  433.  
  434. If you have a SuperVGA display that supports a 16-color mode with 800x600
  435. pixels, and you know the display mode number for this mode, you can select
  436. it by using the command line switches
  437.     -sDEVICE=svga16 -dDisplayMode=NNN
  438. where NNN is the display mode number in decimal.  The modes for some
  439. popular display chipsets are as follows:
  440.  
  441.     Acumos AVGA2, AVGA3                         88    (0x58)
  442.     Advance Logic AL2101                        43    (0x2B)
  443.     Ahead V5000                                 113    (0x71)
  444.     ATI VGAWONDER, Graphics Ultra etc.          84    (0x54)
  445.     Chips and Technologies                      106    (0x6A)
  446.     Cirrus Logic CL-GD 500/600                  100    (0x64)
  447.     Cirrus Logic GD 5422                        88    (0x58)
  448.     Compaq VGA                                  89    (0x59)
  449.     CTI                                         106    (0x6A)
  450.   * Genoa 5xxx, Sigma VGA                       41    (0x29)
  451.     Genoa 6xxx                                  106    (0x6A)
  452.     MXIC MX 68010                               85    (0x55)
  453.     NCR 77C22                                   88    (0x58)
  454.     OAK Technologies OTI-067, OTI-077, OTI037C  82    (0x52)
  455.     OAK Technologies OTI037C w/ NEL BIOS        91    (0x5B)
  456.   * Orchid Prodesigner                          41    (0x29)
  457.     Paradise                                    88    (0x58)
  458.     Poach                                       106    (0x6A)
  459.     Primus                                      42    (0x2A)
  460.     Realtek RT 3106                             31    (0x1F)
  461.     Tecmar                                      22    (0x16)
  462.     Trident 8900                                91    (0x5B)
  463.   * Tseng ET-3000, ET-4000                      41    (0x29)
  464.   * VEGA                                        41    (0x29)
  465.     Video 7 SVGA                                98    (0x62)
  466.     WD90C11                                     92    (0x5C)
  467.     Western Digital                             88    (0x58)
  468.  
  469. The ones marked * are the default (they all use the same value.)  If your
  470. card's chipset doesn't appear on this list, or if you try the value here
  471. and it doesn't work, please e-mail the chipset and correct display mode to
  472. ghost@aladdin.com for inclusion in future releases.
  473.  
  474. If you are running Ghostscript on a MS-DOS machine with a display that is
  475. not EGA/VGA compatible, you must use the Borland compiler.  You must build
  476. Ghostscript with the BGI driver as the default, and you will need the
  477. appropriate .BGI file from the Borland Turbo C library.  (Ghostscript
  478. includes the EGA/VGA driver in the executable.)
  479.  
  480. If you are using the BGI driver, two additional environment variables
  481. become relevant:
  482.  
  483.     BGIPATH - defines the directory where Ghostscript will look for
  484. the appropriate BGI driver.  If BGIPATH is not defined, Ghostscript will
  485. look in the directory defined as BGIDIR in the makefile.  In either case,
  486. if no driver is found in the designated directory, Ghostscript will look
  487. in the current directory.
  488.  
  489.     BGIUSER - a string of the form nn.dname, where nn is a hexadecimal
  490. number giving a display mode and dname is the name of a file containing a
  491. user-supplied BGI driver.  If BGIUSER is defined and the BGI device is
  492. selected, Ghostscript will supply nn as the display mode and will obtain
  493. the driver from the file named dname.
  494.  
  495. Some applications, such as Microsoft Word, require a prologue in front of
  496. the PostScript files they output.  In the case of Word, this is one of the
  497. *.ini files included with the Word distribution.  Other applications may
  498. require other prologues.  These may be specified on the Ghostscript
  499. command line, e.g.,
  500.     gs prologue.ini myfile.ps
  501.  
  502. X Windows
  503. ---------
  504.  
  505. Ghostscript looks for the following resources under the program name
  506. "ghostscript" and class name "Ghostscript":
  507.  
  508.     Name            Class            Default
  509.     ----            -----            -------
  510.     background        Background        white
  511.     foreground        Foreground        black
  512.     borderColor        BorderColor        black
  513.     borderWidth        BorderWidth        1
  514.     geometry        Geometry        NULL
  515.     xResolution        Resolution        **
  516.     yResolution        Resolution        **
  517.     useExternalFonts    UseExternalFonts    true
  518.     useScalableFonts    UseScalableFonts    true
  519.     logExternalFonts    LogExternalFonts    false
  520.     externalFontTolerance    ExternalFontTolerance    10.0
  521.     palette            Palette            Color
  522.     maxGrayRamp        MaxGrayRamp        128
  523.     maxRGBRamp        MaxRGBRamp        5
  524.         maxDynamicColors    MaxDynamicColors    256
  525.     useBackingPixmap    UseBackingPixmap    true
  526.     useXPutImage        UseXPutImage        true
  527.     useXSetTile        UseXSetTile        true
  528.     regularFonts        RegularFonts        see below
  529.     symbolFonts        SymbolFonts        see below
  530.     dingbatFonts        DingbatFonts        see below
  531.  
  532. ** Calculated from display metrics.
  533.  
  534.     Notes on Resources:
  535.  
  536.     Ghostscript doesn't look at the default system background and
  537.     foreground colors; if you want to change the background or
  538.     foreground color, you must set them explicitly for Ghostscript.
  539.     (This is a deliberate choice, so that PostScript documents will
  540.     display correctly -- with white = white and black = black --
  541.     by default, even if text windows use other colors.)
  542.  
  543.     The geometry resource only affects window placement.
  544.  
  545.     Resolution is given in pixels per inch.
  546.  
  547.     The font tolerance gives largest acceptable difference in
  548.     height of the screen font.  The tolerance is expressed as
  549.     a percentage of the height of the desired font.
  550.  
  551.     The palette resource can be used to restrict ghostscript to
  552.     using a grayscale or monochrome palette.
  553.  
  554.     The maxRGBRamp and maxGrayRamp control the maximum number of
  555.     colors that ghostscript allocates ahead of time for the dither
  556.     cube/ramp.  Ghostscript will never preallocate more than half
  557.     of the cells in a colormap.  maxDynamicColors controls the
  558.     maximum number of colors that Ghostscript will allocate
  559.     dynamically in the colormap.
  560.  
  561. The use... resources exist primarily to work around bugs in X servers.  In
  562. particular, many versions of DEC's X server (DECwindows) have bugs that
  563. require setting useXPutImage or useXSetTile to false.
  564.  
  565.     Some servers do not implement backing pixmaps properly, or do not
  566.     have enough memory for them.  If you get strange behavior or "out
  567.     of memory" messages, try setting useBackingPixmap to false.
  568.  
  569.     Some servers do not implement tiling properly.  This will show up
  570.     as broad bands of color where dither patterns should appear.  If
  571.     this happens, try setting useXSetTile to false.
  572.  
  573.     Some servers do not implement bitmap/pixmap displaying properly.
  574.     This may show up as white or black rectangles where characters
  575.     should appear, or characters may appear in "inverse video" (e.g.,
  576.     white on a black rectangle).  If this happens, try setting
  577.     useXPutImage to false.
  578.  
  579. To use native X11 fonts, Ghostscript must map PostScript font names to
  580. the XLFD font names.  The regularFonts, symbolFonts, and dingbatFonts
  581. resources give the name mapping for different encodings.  The XLFD font 
  582. name in the mapping must contain seven dashes.  The X driver adds the
  583. additional size and encoding fields to bring the total number of dashes
  584. in the font name to 14.  Here are the default font mappings:
  585.  
  586.   Regular Fonts: (Fonts available in standard or ISO-Latin-1 encoding)
  587.  
  588.     AvantGarde-Book:-Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\
  589.     AvantGarde-BookOblique:-Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\
  590.     AvantGarde-Demi:-Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\
  591.     AvantGarde-DemiOblique:-Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\
  592.     Bookman-Demi:-Adobe-ITC Bookman-Demi-R-Normal--\n\
  593.     Bookman-DemiItalic:-Adobe-ITC Bookman-Demi-I-Normal--\n\
  594.     Bookman-Light:-Adobe-ITC Bookman-Light-R-Normal--\n\
  595.     Bookman-LightItalic:-Adobe-ITC Bookman-Light-I-Normal--\n\
  596.     Courier:-Adobe-Courier-Medium-R-Normal--\n\
  597.     Courier-Bold:-Adobe-Courier-Bold-R-Normal--\n\
  598.     Courier-BoldOblique:-Adobe-Courier-Bold-O-Normal--\n\
  599.     Courier-Oblique:-Adobe-Courier-Medium-O-Normal--\n\
  600.     Helvetica:-Adobe-Helvetica-Medium-R-Normal--\n\
  601.     Helvetica-Bold:-Adobe-Helvetica-Bold-R-Normal--\n\
  602.     Helvetica-BoldOblique:-Adobe-Helvetica-Bold-O-Normal--\n\
  603.     Helvetica-Narrow:-Adobe-Helvetica-Medium-R-Narrow--\n\
  604.     Helvetica-Narrow-Bold:-Adobe-Helvetica-Bold-R-Narrow--\n\
  605.     Helvetica-Narrow-BoldOblique:-Adobe-Helvetica-Bold-O-Narrow--\n\
  606.     Helvetica-Narrow-Oblique:-Adobe-Helvetica-Medium-O-Narrow--\n\
  607.     Helvetica-Oblique:-Adobe-Helvetica-Medium-O-Normal--\n\
  608.     NewCenturySchlbk-Bold:-Adobe-New Century Schoolbook-Bold-R-Normal--\n\
  609.     NewCenturySchlbk-BoldItalic:-Adobe-New Century Schoolbook-Bold-I-Normal--\n\
  610.     NewCenturySchlbk-Italic:-Adobe-New Century Schoolbook-Medium-I-Normal--\n\
  611.     NewCenturySchlbk-Roman:-Adobe-New Century Schoolbook-Medium-R-Normal--\n\
  612.     Palatino-Bold:-Adobe-Palatino-Bold-R-Normal--\n\
  613.     Palatino-BoldItalic:-Adobe-Palatino-Bold-I-Normal--\n\
  614.     Palatino-Italic:-Adobe-Palatino-Medium-I-Normal--\n\
  615.     Palatino-Roman:-Adobe-Palatino-Medium-R-Normal--\n\
  616.     Times-Bold:-Adobe-Times-Bold-R-Normal--\n\
  617.     Times-BoldItalic:-Adobe-Times-Bold-I-Normal--\n\
  618.     Times-Italic:-Adobe-Times-Medium-I-Normal--\n\
  619.     Times-Roman:-Adobe-Times-Medium-R-Normal--\n\
  620.     ZapfChancery-MediumItalic:-Adobe-ITC Zapf Chancery-Medium-I-Normal--
  621.  
  622.   Symbol Fonts:  (using Symbol encoding)
  623.  
  624.     Symbol: -Adobe-Symbol-Medium-R-Normal--
  625.  
  626.   Dingbat Fonts: (using Dingbat encoding)
  627.  
  628.     ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--
  629.  
  630. For X11/NeWS, one can use the OpenWindows scalable fonts instead, which
  631. will give good quality output for any point size.  In this environment,
  632. the relevant section of the resource file should look like this:
  633.  
  634. Ghostscript.regularFonts: \
  635.     AvantGarde-Book:        -itc-avantgarde-book-r-normal-- \n\
  636.     AvantGarde-BookOblique:        -itc-avantgarde-book-o-normal-- \n\
  637.     AvantGarde-Demi:        -itc-avantgarde-demi-r-normal-- \n\
  638.     AvantGarde-DemiOblique:        -itc-avantgarde-demi-o-normal-- \n\
  639.     Bembo:                -monotype-bembo-medium-r-normal-- \n\
  640.     Bembo-Bold:            -monotype-bembo-bold-r-normal-- \n\
  641.     Bembo-BoldItalic:        -monotype-bembo-bold-i-normal-- \n\
  642.     Bembo-Italic:            -monotype-bembo-medium-i-normal-- \n\
  643.     Bookman-Demi:            -itc-bookman-demi-r-normal-- \n\
  644.     Bookman-DemiItalic:        -itc-bookman-demi-i-normal-- \n\
  645.     Bookman-Light:            -itc-bookman-light-r-normal-- \n\
  646.     Bookman-LightItalic:        -itc-bookman-light-i-normal-- \n\
  647.     Courier:            -itc-courier-medium-r-normal-- \n\
  648.     Courier-Bold:            -itc-courier-bold-r-normal-- \n\
  649.     Courier-BoldOblique:        -itc-courier-bold-o-normal-- \n\
  650.     Courier-Oblique:        -itc-courier-medium-o-normal-- \n\
  651.     GillSans:            -monotype-gill-medium-r-normal-sans- \n\
  652.     GillSans-Bold:            -monotype-gill-bold-r-normal-sans- \n\
  653.     GillSans-BoldItalic:        -monotype-gill-bold-i-normal-sans- \n\
  654.     GillSans-Italic:        -monotype-gill-normal-i-normal-sans- \n\
  655.     Helvetica:            -linotype-helvetica-medium-r-normal-- \n\
  656.     Helvetica-Bold:            -linotype-helvetica-bold-r-normal-- \n\
  657.     Helvetica-BoldOblique:        -linotype-helvetica-bold-o-normal-- \n\
  658.     Helvetica-Narrow:        -linotype-helvetica-medium-r-narrow-- \n\
  659.     Helvetica-Narrow-Bold:        -linotype-helvetica-bold-r-narrow-- \n\
  660.     Helvetica-Narrow-BoldOblique:    -linotype-helvetica-bold-o-narrow-- \n\
  661.     Helvetica-Narrow-Oblique:    -linotype-helvetica-medium-o-narrow-- \n\
  662.     Helvetica-Oblique:        -linotype-helvetica-medium-o-normal-- \n\
  663.     LucidaBright:            -b&h-lucidabright-medium-r-normal-- \n\
  664.     LucidaBright-Demi:        -b&h-lucidabright-demibold-r-normal-- \n\
  665.     LucidaBright-DemiItalic:    -b&h-lucidabright-demibold-i-normal-- \n\
  666.     LucidaBright-Italic:        -b&h-lucidabright-medium-i-normal-- \n\
  667.     LucidaSans:            -b&h-lucida-medium-r-normal-sans- \n\
  668.     LucidaSans-Bold:        -b&h-lucida-bold-r-normal-sans- \n\
  669.     LucidaSans-BoldItalic:        -b&h-lucida-bold-i-normal-sans- \n\
  670.     LucidaSans-Italic:        -b&h-lucida-medium-i-normal-sans- \n\
  671.     LucidaSans-Typewriter:        -b&h-lucidatypewriter-medium-r-normal-sans- \n\
  672.     LucidaSans-TypewriterBold:    -b&h-lucidatypewriter-bold-r-normal-sans- \n\
  673.     NewCenturySchlbk-BoldItalic:    -linotype-new century schoolbook-bold-i-normal-- \n\
  674.     NewCenturySchlbk-Bold:        -linotype-new century schoolbook-bold-r-normal-- \n\
  675.     NewCenturySchlbk-Italic:    -linotype-new century schoolbook-medium-i-normal-- \n\
  676.     NewCenturySchlbk-Roman:        -linotype-new century schoolbook-medium-r-normal-- \n\
  677.     Palatino-Bold:            -linotype-palatino-bold-r-normal-- \n\
  678.     Palatino-BoldItalic:        -linotype-palatino-bold-i-normal-- \n\
  679.     Palatino-Italic:        -linotype-palatino-medium-i-normal-- \n\
  680.     Palatino-Roman:            -linotype-palatino-medium-r-normal-- \n\
  681.     Rockwell:            -monotype-rockwell-medium-r-normal-- \n\
  682.     Rockwell-Bold:            -monotype-rockwell-bold-r-normal-- \n\
  683.     Rockwell-BoldItalic:        -monotype-rockwell-bold-i-normal-- \n\
  684.     Rockwell-Italic:        -monotype-rockwell-medium-i-normal-- \n\
  685.     Times-Bold:            -linotype-times-bold-r-normal-- \n\
  686.     Times-BoldItalic:        -linotype-times-bold-i-normal-- \n\
  687.     Times-Italic:            -linotype-times-medium-i-normal-- \n\
  688.     Times-Roman:            -linotype-times-medium-r-normal-- \n\
  689.     Utopia-Bold:            -adobe-utopia-bold-r-normal-- \n\
  690.     Utopia-BoldItalic:        -adobe-utopia-bold-i-normal-- \n\
  691.     Utopia-Italic:            -adobe-utopia-regular-i-normal-- \n\
  692.     Utopia-Regular:            -adobe-utopia-regular-r-normal-- \n\
  693.     ZapfChancery-MediumItalic:    -itc-zapfchancery-medium-i-normal-- \n
  694. Ghostscript.dingbatFonts: \
  695.     ZapfDingbats:            -itc-zapfdingbats-medium-r-normal--
  696. Ghostscript.symbolFonts: \
  697.     Symbol:                --symbol-medium-r-normal--
  698.  
  699. Users who switch regularly between different X servers may wish to use the
  700. '*' wild card in place of the foundry name (itc, monotype, linotype, b&h,
  701. or adobe); users who do not switch X servers should leave the explicit
  702. foundry in the name, since it speeds up font accessing.
  703.  
  704. To set these resources, put them in a file (such as ~/.Xdefaults) in the
  705. following form:
  706.  
  707. Ghostscript*geometry:    -0+0
  708. Ghostscript*xResolution: 72
  709. Ghostscript*yResolution: 72
  710.  
  711. Then load the defaults into the X server:
  712.  
  713. % xrdb -merge ~/.Xdefaults
  714.  
  715. Ghostscript will take advantage of the "HP XLFD Enhancements," if
  716. available, to use native X11 fonts for fonts that are anamorphically
  717. scaled, rotated, or mirrored.  If the user has installed these changes to
  718. their X or font server, they will automatically be used when appropriate.
  719.  
  720. SCO Unix
  721. --------
  722.  
  723. Because of bugs in the SCO Unix kernel, Ghostscript will not work if you
  724. select direct screen output (gdevsco.c) and also allow it to write messages
  725. on the console.  If you are using direct screen output, redirect
  726. Ghostscript's terminal output to a file.
  727.  
  728. Amiga
  729. -----
  730.  
  731. Ghostscript supports three Amiga specific devices (but see below for ILBM):
  732.     amiga           Amiga Workbench window
  733.     amiga_custom    Amiga custom screenmodes
  734.     amiga_printer   Amiga printer.device
  735.  
  736. The device 'amiga' opens an Intuition window on the Workbench screen to
  737. display the image. Its usage should be pretty obvious.
  738.  
  739. The device 'amiga_custom' opens a Customscreen to display the image. This 
  740. allows any Display Mode available in the screenmode preferences to be used
  741. with Ghostscript too. There are two ways to specify the desired Display Mode:
  742.  
  743. - Provide it via the command line switch -sDisplayMode. It will accept both,
  744. the Name or the ModeID of a Display Mode as in these examples (case is 
  745. ignored, spaces have to be enclosed in double-quotes and a ModeID has to be 
  746. prefixed by 0x):
  747.     -sDEVICE=amiga_custom -sDisplayMode=MULTISCAN:Productivity
  748.     -sDEVICE=amiga_custom "-sDisplayMode=PAL:Low Res Laced"
  749.     -sDEVICE=amiga_custom -sDisplayMode=0x21000
  750.  
  751. - Ommit the command line switch. On first invocation a screenmode requester
  752. allows the selection of a Display Mode. The selection will be stored in the 
  753. local environment variable GS_DISPLAYMODE and used on any subsequent 
  754. invocation of Ghostscript without the command line switch. This variable can 
  755. be reset to make the requester reappear the next time. It can be made 
  756. permanent too, if stored in the global environment ENVARC:; wildcards in
  757. the name are supported (i.e. #?Laced#? will use the first interlaced Display 
  758. Mode). However, if permanent custom settings are desired, using aliases is 
  759. probably more flexible (see below).
  760.  
  761. It is convenient to use aliases for ones personal custom settings, for
  762. example: alias gshigh gs -sDEVICE=amiga_custom "-sDisplayMode=NTSC:High Res"
  763. makes any future call just 'gshigh File.ps'.
  764.  
  765. The device 'amiga_printer' is a convenient alternative for the printer devices
  766. provided by Ghostscript itself. It facilitates standard Amiga printing via the
  767. Workbench printer drivers and respects most settings in the graphics 
  768. preferences as described in the Workbench documentation. For example:
  769. to get a full sized image one should set dimensions to either 'ignore' or 
  770. 'max. boundaries'; 'absolute' will scale the image as appropriate (only if 
  771. the selected resolution of the printer is 1:1, else the output will be scaled 
  772. wrong owing to a bug in the printer.device).
  773. Although 'amiga_printer' tries to deal with non-printable margins and similar
  774. things, the implementations of the printer.device and most printer drivers 
  775. have severe limitations concerning these tasks (however, some third-party 
  776. printer drivers, such as the ones provided by Canon are doing a much better 
  777. job). Therefore it is recommended to use the more precise Ghostscript printer 
  778. devices, if accuracy matters.
  779.  
  780. All three devices are supporting -g and -r as described in 'Switches' below. 
  781. Although their is generally no need for them there are some special cases
  782. where they may be useful. For example: the usage of -r is very convenient to 
  783. preview an image within the boundaries of the monitor without fiddling with
  784. the more powerful, yet more complex postscript scaling commands.
  785.  
  786. Ghostscript currently has only limited support for IFF ILBM files:
  787.     amiga_ilbm    IFF ILBM file format
  788.  
  789. The device 'amiga_ilbm' works like any other Ghostscript raster file or 
  790. printer device (i.e. pbm), see 'Choosing the output device' above on how 
  791. to specify an output file.
  792. It supports dithered grayscale only and is not portable to other platforms 
  793. because it uses iffparse.library. A portable implementation with color 
  794. support is currently under development.
  795.  
  796. ********
  797. ******** Switches
  798. ********
  799.  
  800. Unless otherwise noted, these apply to all platforms.
  801.  
  802. Normal switches
  803. ---------------
  804.  
  805.     Input control
  806.     -------------
  807.  
  808.     @filename
  809.         Causes Ghostscript to read filename and treat its
  810.         contents the same as the command line.  (This is
  811.         intended primarily for getting around MS-DOS's
  812.         128-character limit on the length of a command line.)
  813.         Switches or file names in the file may be separated by
  814.         any amount of white space (space, tab, line break);
  815.         there is no limit on the size of the file.
  816.  
  817.     -- filename arg1 ...
  818.     -+ filename arg1 ...
  819.         Takes the next argument as a file name as usual, but takes
  820.         all remaining arguments (even if they have the syntactic
  821.         form of switches) and defines the name ARGUMENTS in
  822.         userdict (not systemdict) as an array of those strings,
  823.         *before* running the file.  When Ghostscript finishes
  824.         executing the file, it exits back to the shell.
  825.  
  826.     -@ filename arg1 ...
  827.         Does the same thing as -- and -+, but expands @filename
  828.         arguments.
  829.  
  830.     -
  831.         This is not really a switch.  It indicates to Ghostscript
  832.         that the standard input is coming from a file or a pipe.
  833.         Ghostscript reads from stdin until reaching end-of-file,
  834.         executing it like any other file, and then continues
  835.         processing the command line.  At the end of the command
  836.         line, Ghostscript exits rather than going into its
  837.         interactive mode.  NOTE: this switch works only for
  838.         PostScript, not for PDF.
  839.  
  840.     -c tokens ...
  841.         Interprets arguments, up to the next argument that begins
  842.         with - followed by a non-digit or with @, as PostScript
  843.         code.  For example, if the file quit.ps contains just
  844.         the word `quit', the following are equivalent:
  845.             quit.ps
  846.         and
  847.             -c quit
  848.         Each argument must be exactly one token, as defined by
  849.         the `token' operator.
  850.  
  851.     -ffilename
  852.         Execute the given file, even if its name begins with a -
  853.         or an @.  -f alone does nothing, but it provides a
  854.         convenient way to terminate the list of tokens for the -c
  855.         switch.
  856.  
  857.     File searching
  858.     --------------
  859.  
  860.     -Idirectories
  861.         Adds the designated list of directories at the head of the
  862.         search path for library files.
  863.  
  864.     -P
  865.         Makes Ghostscript look first in the current directory for
  866.         library files.  This is currently the default.
  867.     -P-
  868.         Makes Ghostscript *not* look first in the current directory
  869.         for library files (unless, of course, the first explicitly
  870.         supplied directory is `.').
  871.  
  872.     Parameter setting
  873.     -----------------
  874.  
  875.     -Dname=token
  876.     -dname=token
  877.         Define a name in systemdict with the given definition.
  878.         The token must be exactly one token (as defined by the
  879.         'token' operator) and must not contain any whitespace.
  880.         If the token is a non-literal name, it must be true,
  881.         false, or null.
  882.  
  883.     -Dname
  884.     -dname
  885.         Define a name in systemdict with value=true.
  886.  
  887.     -Sname=string
  888.     -sname=string
  889.         Define a name in systemdict with a given string as value.
  890.         This is different from -d.  For example,
  891.             -dname=35
  892.         is equivalent to the program fragment
  893.             /name 35 def
  894.         whereas
  895.             -sname=35
  896.         is equivalent to
  897.             /name (35) def
  898.  
  899.     -uname
  900.         Un-define a name, cancelling -d or -s.
  901.  
  902.     -gnumber1xnumber2
  903.         Equivalent to -dDEVICEWIDTH=number1 and
  904.         -dDEVICEHEIGHT=number2, specifying the device width and
  905.         height in pixels.  This is for the benefit of devices (such
  906.         as X11 windows and VESA displays) that require (or allow)
  907.         width and height to be specified.
  908.  
  909.     -rnumber
  910.     -rnumber1xnumber2
  911.         Equivalent to -dDEVICEXRESOLUTION=number1 and
  912.         -dDEVICEYRESOLUTION=number2, specifying the device
  913.         horizontal and vertical resolution in pixels per inch.  This
  914.         is for the benefit of devices (such as printers) that
  915.         support multiple X and Y resolutions.
  916.  
  917.     Miscellaneous
  918.     -------------
  919.  
  920.     -q
  921.         Quiet startup -- suppress normal startup messages,
  922.         and also do the equivalent of -dQUIET.
  923.  
  924. Note that gs_init.ps makes systemdict read-only, so the values of names
  925. defined with -D/d/S/s cannot be changed (although, of course, they can be
  926. superseded by definitions in userdict or other dictionaries.)
  927.  
  928. Special names
  929. -------------
  930.  
  931. -dCOLORSCREEN
  932. -dCOLORSCREEN=0
  933. -dCOLORSCREEN=false
  934.     On high-resolution devices (at least 150 dpi resolution, or
  935. -dDITHERPPI specified), -dCOLORSCREEN forces the use of separate halftone
  936. screens with different angles for C/M/Y/K or R/G/B if halftones are needed
  937. (this produces the best-quality output); -dCOLORSCREEN=0 uses separate
  938. screens with the same frequency and angle; -dCOLORSCREEN=false forces the
  939. use of a single binary screen.  If COLORSCREEN is not specified, the default
  940. is to use separate screens with different angles if the device has fewer
  941. than 5 bits per color, and a single binary screen (which will never actually
  942. be used under normal circumstances) on all other devices.
  943.  
  944. -dDELAYBIND
  945.     causes 'bind' to remember all its invocations, but not actually
  946. execute them until the .bindnow procedure is called.  Useful only for
  947. certain specialized packages like pstotext that redefine operators.
  948.  
  949. -dDISKFONTS
  950.     causes individual character outlines to be loaded from the disk the
  951. first time they are encountered.  (Normally Ghostscript loads all the
  952. character outlines when it loads a font.)  This may allow loading more
  953. fonts into RAM, at the expense of slower rendering.  DISKFONTS is only
  954. effective if the diskfont feature was selected in the executable; otherwise
  955. it is ignored.
  956.  
  957. -dDITHERPPI=lpi
  958.     forces all devices to be considered high-resolution, and forces use
  959. of a halftone screen or screens with lpi lines per inch, disregarding the
  960. actual device resolution.  Reasonable values for lpi are N/5 to N/20, where
  961. N is the resolution in dots per inch.
  962.  
  963. -dFIXEDMEDIA
  964.     causes the media size to be fixed after initialization, which causes
  965. pages of other sizes or orientations to be rotated or scaled automatically.
  966. (This switch is something of a hack; when all the drivers have been updated
  967. to report correct values for their available media, the switch will be
  968. removed.)  -g automatically sets -dFIXEDMEDIA, but -sPAPERSIZE= does not.
  969.  
  970. -dFIXEDRESOLUTION
  971.     causes the media resolution to be fixed similarly.  -r automatically
  972. sets -dFIXEDRESOLUTION.
  973.  
  974. -dLOCALFONTS
  975.     causes Type 1 fonts to be loaded into the current VM, which is
  976. normally local VM, instead of always being loaded into global VM.  Only
  977. useful for compatibility with Adobe printers for loading some obsolete
  978. fonts.
  979.  
  980. -dNOBIND
  981.     disables the 'bind' operator.  Only useful for debugging.
  982.  
  983. -dNOCACHE
  984.     disables character caching.  Only useful for debugging.
  985.  
  986. -dNOCIE
  987.     substitutes DeviceGray and DeviceRGB for CIEBasedA and CIEBasedABC
  988. color spaces respectively.  Only useful on very slow systems where color
  989. accuracy is less important.
  990.  
  991. -dNODISPLAY
  992.     suppresses the normal initialization of the output device.  This
  993. may be useful when debugging.
  994.  
  995. -dNOFONTMAP
  996.     suppresses the normal loading of the Fontmap file.  This may be
  997. useful in environments without a file system.
  998.  
  999. -dNOGC
  1000.     disables the garbage collector in Level 2 systems.  Only
  1001. useful for debugging.
  1002.  
  1003. -dNOPAUSE
  1004.     disables the prompt and pause at the end of each page.  This may
  1005. be desirable for applications where another program is 'driving'
  1006. Ghostscript.
  1007.  
  1008. -dNOPLATFONTS
  1009.     disables the use of fonts supplied by the underlying platform
  1010. (X Windows or Microsoft Windows).  This may be needed if the platform
  1011. fonts look undesirably different from the scalable fonts.
  1012.  
  1013. -dNOPROMPT
  1014.     disables only the prompt, but not the pause, at the end of each
  1015. page.  This may be useful on PC displays that get confused if a program
  1016. attempts to write text to the console while the display is in a graphics
  1017. mode.
  1018.  
  1019. -dORIENT1=false
  1020.     indicates that the file uses a value of 0 to indicate portrait
  1021. orientation to setpage[params] rather than the default orientation of 1.
  1022. This is needed for some files produced by badly designed applications that
  1023. 'know' that the output will be printed on certain roll-media printers.
  1024.  
  1025. -dSAFER
  1026.     disables the deletefile and renamefile operators, and the
  1027. ability to open files in any mode other than read-only.  This may be
  1028. desirable for spoolers or other sensitive environments.
  1029.  
  1030. -dSHORTERRORS
  1031.     makes certain error and information messages more Adobe-compatible.
  1032.  
  1033. -dWRITESYSTEMDICT
  1034.     leaves systemdict writable.  This is necessary when running
  1035. special utility programs such as font2c and pcharstr, which must bypass
  1036. normal PostScript access protection.
  1037.  
  1038. -sDEVICE=device
  1039.     selects an alternate initial output device, as described above.
  1040.  
  1041. -sFONTMAP=filename1;filename2;...
  1042.     specifies (an) alternate name(s) for the Fontmap file.  Note that
  1043. the names are separated by ; on Unix systems, by : on MS-DOS or MS Windows
  1044. systems, and by , on VMS systems, just as for search paths.
  1045.  
  1046. -sFONTPATH=dir1;dir2;...
  1047.     specifies a list of directories that will be scanned automatically
  1048. for fonts, overriding the GS_FONTPATH environment variable.
  1049.  
  1050. -sOutputFile=filename
  1051.     selects an alternate output file (or pipe) for the initial output
  1052. device, as described above.
  1053.  
  1054. -sSUBSTFONT=fontname
  1055.     causes the given font to be substituted for all unknown fonts,
  1056. instead of using the normal intelligent substitution algorithm.
  1057.  
  1058. Debugging switches
  1059. ------------------
  1060.  
  1061. The -Z switch only applies if the interpreter was built for a
  1062. debugging configuration (DEBUG=1 or -DDEBUG selected at compile
  1063. time).
  1064.  
  1065.     -A    Fill empty storage with a distinctive bit pattern
  1066.         for debugging.  Equivalent to -Z@.
  1067.     -A-    Turn off -A, equivalent to -Z-@.
  1068.  
  1069.     -E    Turn on tracing of error returns from operators.
  1070.         Equivalent to -Z#.
  1071.     -E-    Turn off -E, equivalent to -Z-#.
  1072.  
  1073.     -Mn    Force the interpreter's allocator to acquire additional
  1074.         memory in units of nK, rather than the default (currently
  1075.         20K on MS-DOS systems, 50K on Unix).  n is a positive
  1076.         decimal integer (not exceeding 63 on MS-DOS systems).
  1077.  
  1078.     -Nn    Allocate space for nK names, rather than the default
  1079.         (normally 64K).  n > 64 is only allowed if the interpreter
  1080.         was compiled with EXTEND_NAMES defined.
  1081.  
  1082.     -Zxxx    Turn on debugging printout.
  1083.     -Z-xxx    Turn off debugging printout.
  1084.         Each of the xxx characters selects an option.
  1085.         Case is significant.
  1086.             0 = garbage collector, minimal detail
  1087.             1 = type 1 & type 42 font interpreter
  1088.             2 = curve subdivider/rasterizer
  1089.               3 = curve subdivider/rasterizer, detail
  1090.             4 = garbage collector (strings)
  1091.               5 = garbage collector (strings, detail)
  1092.             6 = garbage collector (chunks, roots)
  1093.               7 = garbage collector (objects)
  1094.               8 = garbage collector (refs)
  1095.               9 = garbage collector (pointers)
  1096.             a = allocator (large blocks only)
  1097.               A = allocator (all calls)
  1098.             b = bitmap image processor
  1099.               B = bitmap images, detail
  1100.             c = color/halftone mapper
  1101.             d = dictionary put/undef
  1102.               D = dictionary lookups
  1103.             e = external (OS-related) calls
  1104.             f = fill algorithm (summary)
  1105.               F = fill algorithm (detail)
  1106.             g = gsave/grestore[all]
  1107.             h = halftone renderer
  1108.               H = halftones, every pixel
  1109.             i = interpreter, just names
  1110.               I = interpreter, everything
  1111.             j = (Japanese) composite fonts
  1112.             k = character cache & xfonts
  1113.               K = character cache, every access
  1114.             l = command lists, bands
  1115.               L = command lists, everything
  1116.             m = makefont and font cache
  1117.             n = name lookup (new names only)
  1118.             o = outliner (stroke)
  1119.               O = stroke detail
  1120.             p = band list paths
  1121.               P = all paths
  1122.             q = clipping
  1123.             r = arc renderer
  1124.             s = streams
  1125.               S = scanner
  1126.             t = tiling algorithm
  1127.             u = undo saver (for save/restore), finalization
  1128.               U = undo saver, more detail
  1129.             v = rectangle fill
  1130.               V = device-level output
  1131.             w = compression encoder/decoder
  1132.             x = transformations
  1133.             y = Type 1 hints
  1134.               Y = Type 1 hints, every access
  1135.             z = trapezoid fill
  1136.             # = operator error returns
  1137.             % = externally processed comments
  1138.             ~ = math functions
  1139.         The following switches select debugging options other than
  1140.         printout.
  1141.             $ = set unused parts of object references to
  1142.                 identifiable garbage values
  1143.             + = use minimum-size stack blocks
  1144.             . = use small-memory table sizes even on
  1145.                 large-memory machines
  1146.             ? = validate pointers before, during and after GC,
  1147.                 also before and after save and restore
  1148.             @ = fill newly allocated, garbage-collected, and
  1149.                 freed storage with a marker (a1, c1, and
  1150.                 f1 respectively)
  1151.  
  1152. ********
  1153. ******** Frequently Asked Questions
  1154. ********
  1155.  
  1156. Q: The spacing of characters / words / margins on the display is
  1157. wrong, what can I do?
  1158.  
  1159. A: This is almost always caused by differences between the character
  1160. widths that were used to format the document and the character widths
  1161. of the fonts installed in your system.  (This only affects the
  1162. display, and only with window systems, not with MS-DOS.)  If this
  1163. happens, invoke Ghostscript with the -dNOPLATFONTS switch, or (on X
  1164. Windows) set
  1165.     Ghostscript*useExternalFonts: false
  1166. in your X resource file.
  1167.  
  1168. For more information about fonts on the display, please read the
  1169. first sections of fonts.txt.
  1170.  
  1171. Q: On my H-P LaserJet, why do I only get a partial page of output, or a
  1172. single page gets split across two sheets?
  1173.  
  1174. A: Printing on a Hewlett-Packard LaserJet at full resolution (300 DPI)
  1175. requires a printer with at least 1.5 Mb of memory.  150 DPI printing
  1176. requires only .5 Mb.  You can select 150 DPI printing with the command
  1177. line switch
  1178.     -r150
  1179. (This is not necessary on DeskJet printers.)
  1180.  
  1181. Q: On my MS-DOS system using GS.EXE (Borland compiler), why do I get a
  1182. `limitcheck in setdevice' or `VMerror in setdevice' error message?
  1183.  
  1184. A: On MS-DOS systems using the Borland compiler, if Ghostscript gives you
  1185. a 'limitcheck in setdevice' error, it may mean Ghostscript's standard
  1186. buffer size wasn't large enough.  Likewise, if Ghostscript gives you a
  1187. 'VMerror in setdevice' error, it means the buffer size was too large.  You
  1188. can use the -dBufferSpace= switch to set the buffer size to a different
  1189. value, e.g.,
  1190.     -dBufferSpace=50000
  1191. The default value is 25000; the smallest value Ghostscript accepts is
  1192. 10000; the largest valid value is 65000.
  1193.